import java.util.Scanner;


public class LexerDriver {
	
	public static void main(String[] args){
		
		System.out.println("Please enter the name of the file containing a grammar: ");
		Scanner scan = new Scanner(System.in);
		String filename = scan.nextLine();
		try{
			Lexer lex = new Lexer(filename);
			lex.dfa.save(filename);
			
			System.out.println("\nThe DFA for the grammar given in " + filename + " has been built.");
		}
		catch(Exception e){
			e.printStackTrace();
		}
	}

}
